/*
 * SistemaTesisAboutBox.java
 */

package sistematesis;

import org.jdesktop.application.Action;
import javax.swing.JFileChooser;
import javax.swing.filechooser.FileNameExtensionFilter;

public class SistemaTesisIngresoMallaCurricular extends javax.swing.JDialog {

    public SistemaTesisIngresoMallaCurricular(java.awt.Frame parent) {
        super(parent);
        initComponents();
        getRootPane().setDefaultButton(closeButtonIngresoAsignatura);
    }

    @Action public void closeAboutBox() {
        dispose();
    }
     @Action
    public void AbrirFuente() {
        JFileChooser fc = new JFileChooser();
        FileNameExtensionFilter filtro= new FileNameExtensionFilter("Microsoft Excel 2003 (xls)", "XLS");
        fc.setFileFilter(filtro);
        fc.showOpenDialog(null);
        String ruta = new String();//ruta contendrá la dirección del archivo seleccionado
        ruta=fc.getSelectedFile().toString();
        UrlMalla.setText(ruta);
        }
     public static String Devuelve2(){

        return UrlMalla.getText();
     }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jLabel1 = new javax.swing.JLabel();
        UrlMalla = new javax.swing.JTextField();
        jSeparator1 = new javax.swing.JSeparator();
        ExaminarIngresoAsignaturas = new javax.swing.JButton();
        closeButtonIngresoAsignatura = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setModal(true);
        setName("aboutBox"); // NOI18N
        setResizable(false);

        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sistematesis.SistemaTesisApp.class).getContext().getResourceMap(SistemaTesisIngresoMallaCurricular.class);
        jLabel1.setFont(resourceMap.getFont("jLabel1.font")); // NOI18N
        jLabel1.setForeground(resourceMap.getColor("jLabel1.foreground")); // NOI18N
        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        UrlMalla.setText(resourceMap.getString("UrlMalla.text")); // NOI18N
        UrlMalla.setName("UrlMalla"); // NOI18N

        jSeparator1.setName("jSeparator1"); // NOI18N

        javax.swing.ActionMap actionMap = org.jdesktop.application.Application.getInstance(sistematesis.SistemaTesisApp.class).getContext().getActionMap(SistemaTesisIngresoMallaCurricular.class, this);
        ExaminarIngresoAsignaturas.setAction(actionMap.get("AbrirFuente")); // NOI18N
        ExaminarIngresoAsignaturas.setText(resourceMap.getString("ExaminarIngresoAsignaturas.text")); // NOI18N
        ExaminarIngresoAsignaturas.setName("ExaminarIngresoAsignaturas"); // NOI18N

        closeButtonIngresoAsignatura.setAction(actionMap.get("closeAboutBox")); // NOI18N
        closeButtonIngresoAsignatura.setText(resourceMap.getString("closeButtonIngresoAsignatura.text")); // NOI18N
        closeButtonIngresoAsignatura.setName("closeButtonIngresoAsignatura"); // NOI18N

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(UrlMalla, javax.swing.GroupLayout.DEFAULT_SIZE, 408, Short.MAX_VALUE)
                            .addComponent(jLabel1)))
                    .addGroup(layout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jSeparator1, javax.swing.GroupLayout.DEFAULT_SIZE, 408, Short.MAX_VALUE))
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                        .addContainerGap(341, Short.MAX_VALUE)
                        .addComponent(ExaminarIngresoAsignaturas))
                    .addGroup(layout.createSequentialGroup()
                        .addGap(173, 173, 173)
                        .addComponent(closeButtonIngresoAsignatura)))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1)
                .addGap(2, 2, 2)
                .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(UrlMalla, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(ExaminarIngresoAsignaturas)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(closeButtonIngresoAsignatura, javax.swing.GroupLayout.DEFAULT_SIZE, 23, Short.MAX_VALUE)
                .addContainerGap())
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton ExaminarIngresoAsignaturas;
    public static javax.swing.JTextField UrlMalla;
    private javax.swing.JButton closeButtonIngresoAsignatura;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JSeparator jSeparator1;
    // End of variables declaration//GEN-END:variables
    
}
